473,468 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

My menu bar is dancing around

290 Contributor
Hi,

I been working on my editor bar and still have two problems.

One is that when you run your curser over the images,
the whole bar starts "dancing".

Go here to take a look: dancing bar

Can you see what is making it do that ?

The other problem I have is the color selector.
First - I can not get it positioned in line with the images.

Second - I don't know how to set the foreground color.
presently its gray but I want it the same as background color.

If you can help with any of these problems would most appreciate it.

Here is my css code:


Expand|Select|Wrap|Line Numbers
  1. /*
  2. *  Editor Styles
  3. */
  4.  
  5. .my_editor {
  6.   width: 600px;
  7.     background: #E1E1E2;
  8.     border: 1px solid #000;
  9.     margin: 10px 300px 10px 110px;
  10.     float:left;
  11. }
  12.  
  13. .imgbtn {
  14.     background: #E1E1E2;
  15.     margin: 10px 0 4px 0;
  16. /*    border: 1px solid #000; */    
  17. }
  18.  
  19. .editor {
  20.   background: #E1E1E2;
  21.     padding: 10px 0 0px 10px;
  22.     float:left;
  23. }
  24.  
  25. .select{
  26. margin-top:-10px;
  27. }
  28.  
  29. .imgbtn:hover{
  30.     background: #cff;
  31.     border: 1px solid #33f;
  32. }
  33.  
  34. .sptr {
  35.     background: #E1E1E2;
  36.     margin: 4px 0 4px 0;
  37. }
  38.  
Many thanks
Jan 24 '09 #1
6 2306
drhowarddrfine
7,435 Recognized Expert Expert
121 HTML errors
1 CSS error
Jan 24 '09 #2
serdar
88 New Member
Two solutions for your 'dancing bar' problem which is caused by the image borders set on hover state.

Solution 1:
Expand|Select|Wrap|Line Numbers
  1. .imgbtn {
  2.     background: #E1E1E2;
  3.     margin: 10px 0 4px 0;
  4.     padding:1px;
  5. }
  6.  
  7. .imgbtn:hover{
  8.     background: #cff;
  9.     border: 1px solid #33f;
  10.     padding:0px;    
  11. }
Solution 2:
Expand|Select|Wrap|Line Numbers
  1. .imgbtn {
  2.     background: #E1E1E2;
  3.     margin: 10px 0 4px 0;
  4.     border: 1px solid #E1E1E2;
  5. }
  6.  
  7. .imgbtn:hover{
  8.     background: #cff;
  9.     border: 1px solid #33f;    
  10. }
  11.  
For your alignment problem; add

Expand|Select|Wrap|Line Numbers
  1. {float:left; padding-top:10px;} 
in these classes: editor, imgbtn, sptr, select

Finally for your third problem:

I don't know how to set the foreground color.
presently its gray but I want it the same as background color.
Do you want to set the text color or the background color when you hover an option? Please clarify.

Posts merged by Moderator - Post your response in one post; it is unnecessary to use 3 separate posts.
Jan 24 '09 #3
jeddiki
290 Contributor
The background color.

Basically I want the color to remain the same whether hover or not.
Each select option is a different color and when hovered over it doesn't need to change color.
Jan 25 '09 #4
jeddiki
290 Contributor
I put in those changes to the css

and I now have:
Expand|Select|Wrap|Line Numbers
  1. /*
  2. *  Editor Styles
  3. */
  4.  
  5. .my_editor {
  6.   width: 600px;
  7.     background: #E1E1E2;
  8.     border: 1px solid #000;
  9.     margin: 10px 300px 10px 110px;
  10.     float:left;
  11. }
  12.  
  13.  
  14.  
  15. .imgbtn {
  16.   background: #E1E1E2;
  17.   padding-top:10px;
  18.     float:left;
  19. }
  20.  
  21. .imgbtn:hover{
  22.   background: #cff;
  23.   border: 1px solid #33f;
  24.     float:left;
  25. }
  26.  
  27.  
  28. .editor {
  29.   background: #E1E1E2;
  30.     padding-top:10px;
  31.     float:left;
  32. }
  33.  
  34. .select{
  35.   padding-top:10px;
  36.     float:left;
  37. }
  38.  
  39. .sptr {
  40.     background: #E1E1E2;
  41.     padding-top:10px;
  42.     float:left;
  43. }
  44.  
as you can see here:
Celebrity Membership.

it is still jumping about and the hover state dos'nt look too good.
Jan 25 '09 #5
jeddiki
290 Contributor
Thanks for all your help,

From your guidance I've now got everything nice except for the
select color. This for some reason chanches to gray when the mouse hovers over the colored areas.

This is the code that I have:

Expand|Select|Wrap|Line Numbers
  1.  <select name="x_color">
  2.      <option style = "background: black;" value = 'black' selected= "selected" >black &nbsp;&nbsp;</option>
  3.      <option style = "background: blue;" value = 'blue' >blue &nbsp;&nbsp;</option>
  4.      <option style = "background: red;" value = 'red' >red &nbsp;&nbsp;</option>
  5.      <option style = "background: green;" value = 'green' >green &nbsp;&nbsp;</option>
  6.     <option style = "background: yellow;" value = 'yellow' >yellow &nbsp;&nbsp;</option>
  7.      <option style = "background: gray;" value = 'gray' >grey &nbsp;&nbsp;</option>
  8.      <option style = "background: white" value = 'white' >white &nbsp;&nbsp;</option>
  9.      <option style = "background: brown;" value = 'brown' >brown &nbsp;&nbsp;</option>
  10.      <option style = "background: orange;" value = 'orange' >orange &nbsp;&nbsp;</option>
  11.     </select></span>     
And the CSS:

Expand|Select|Wrap|Line Numbers
  1. /*
  2. *  Editor Styles
  3. */
  4.  
  5. .my_editor {
  6.   width: 600px;
  7.     background: #E1E1E2;
  8.     border: 1px solid #000;
  9.     margin: 10px 300px 10px 110px;
  10.     float:left;
  11. }
  12.  
  13. .imgbtn {
  14.   background: #E1E1E2;
  15.     margin: 10px 0 4px 0;
  16.     padding:1px;
  17.     float:left;
  18. }
  19.  
  20. .imgbtn:hover{
  21.   background: #cff;
  22.   border: 1px solid #33f;
  23.     padding:0px;
  24. }
  25.  
  26.  
  27. .editor {
  28.   background: #E1E1E2;
  29.     margin:0 10px 0 10px;
  30.     padding-top:12px;
  31.     float:left;
  32. }
  33.  
  34. .select{
  35.   padding-top:10px;
  36.     float:left;
  37. }
  38.  
  39. .sptr {
  40.     background: #E1E1E2;
  41.     padding-top:10px;
  42.     float:left;
  43. }
The problem can be on this page
- look at the color option box

Thanks for any ideas :)


Can any one please help me sort out these color options ?
Jan 25 '09 #6
serdar
88 New Member
I'm not sure with this, but you cannot change the background color of a selected option element with CSS because it's the same color when you select a text in your browser and so it's browser specific.
Jan 25 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
7
by: jt | last post by:
I am new to Javascript and I am having problems with loading a pull down menu. I get this error: javax.servlet.ServletException: No data found It will list the items just fine if I just list...
7
by: cefrancke | last post by:
I cant seem to find a straight answer on the following. I want to programmatically hide all menus except a basic custom report menu (during report preview) and right click pop-up A-Z sorting on...
1
by: dkimbrell | last post by:
Hi there, I'm very novice to web design. I'm trying to make a pulldown menu, but the formatting keeps getting screwed up when you roll the mouse over it. Please see www.boundarysys.com for...
1
by: leicklda | last post by:
Hi there, I'm very novice to web design. I'm trying to make a pulldown menu, but the formatting keeps getting screwed up when you roll the mouse over it. Please see www.boundarysys.com for...
27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
0
by: jason | last post by:
Playing around with asp.net 2.0 and asp:menu for the first time.. what's the attribute/code so that each item in my menu has a *SEPERATE* border around it? Seems I can only make the border around...
2
by: jason | last post by:
Does anybody know how I would get borders around each menuitem? Do I have incorportate into a table? Thanks. The below produces a border around the entire menu. <form id="form1" runat="server">...
4
by: Adam Rosner | last post by:
I have a large Access application that I look after. This app is written in Access 2000 and uses menu bars. (CommandBars and CommandBar Controls). The menu is static - built into the app (ie...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.